package com.vietnam.power.persitence;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the menu_access_right database table.
 * 
 */
@Entity
@Table(name="menu_access_right")
public class MenuAccessRight implements Serializable {
	private static final long serialVersionUID = 1L;
	private int id;
	private Date createdDate;
	private UserRoleInfo userRoleInfo;
	private AllowAccessDictionary allowAccessDictionary;
	private Menu menu;

	public MenuAccessRight() {
	}


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}


	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="created_date")
	public Date getCreatedDate() {
		return this.createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}


	//bi-directional many-to-one association to UserRoleInfo
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="user_role_info_id")
	public UserRoleInfo getUserRoleInfo() {
		return this.userRoleInfo;
	}

	public void setUserRoleInfo(UserRoleInfo userRoleInfo) {
		this.userRoleInfo = userRoleInfo;
	}


	//bi-directional many-to-one association to AllowAccessDictionary
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="allow_id")
	public AllowAccessDictionary getAllowAccessDictionary() {
		return this.allowAccessDictionary;
	}

	public void setAllowAccessDictionary(AllowAccessDictionary allowAccessDictionary) {
		this.allowAccessDictionary = allowAccessDictionary;
	}


	//bi-directional many-to-one association to Menu
	@ManyToOne(fetch=FetchType.LAZY)
	public Menu getMenu() {
		return this.menu;
	}

	public void setMenu(Menu menu) {
		this.menu = menu;
	}

}